﻿using System;
using System.Collections.Generic;
using System.Text;

namespace PIM_ATE
{
    class PIMProcess
    {
        public event EventHandler evt_set_settings_handle;
        protected virtual void On_evt_set_settings_handle(object obj, EventArgs e)
        {
            if (this.evt_set_settings_handle != null)
                this.evt_set_settings_handle(obj, e);
        }
        
        public event EventHandler evt_get_results_handle;
        protected virtual void On_evt_get_results_handle(object obj, EventArgs e)
        {
            if (this.evt_get_results_handle != null)
                this.evt_get_results_handle(obj, e);
        }

        public event EventHandler evt_complete_process_handle;
        protected virtual void On_evt_complete_process_handle(object obj, EventArgs e)
        {
            if (this.evt_complete_process_handle != null)
                this.evt_complete_process_handle(obj, e);
        }

        public event EventHandler evt_complete_all_process_handle;
        protected virtual void On_evt_complete_all_process_handle(object obj, EventArgs e)
        {
            if (this.evt_complete_all_process_handle != null)
                this.evt_complete_all_process_handle(obj, e);
        }

        public event EventHandler evt_log_handle;
        protected virtual void On_evt_log_handle(object obj, EventArgs e)
        {
            if (this.evt_log_handle != null)
                this.evt_log_handle(obj, e);
        }
        public event EventHandler evt_write_handle;
        protected virtual void On_evt_write_handle(object obj, EventArgs e)
        {
            if (this.evt_write_handle != null)
                this.evt_write_handle(obj, e);
        }

        //public event EventHandler evt_show_error_handle;
        //protected virtual void On_evt_show_error_handle(object obj, EventArgs e)
        //{
        //    if (this.evt_show_error_handle != null)
        //        this.evt_show_error_handle(obj, e);
        //}

        public virtual bool PIMProcessMatchProcode(ClsDataProduct product)
        {
            return false;
        }

        public virtual bool PIMStepCheck(ClsDataProduct product)
        {
            return false;
        }
        public virtual bool PIMTestModeSet(ModTestMode mode = ModTestMode.First)
        {
            return false;
        }
        public virtual bool PIMProcessConfig(object objConfigList, ClsDataProduct product, ClsDataUser user)
        {
            return false;
        }

        public virtual void PIMProcessStrart()
        {
            return;
        }

        public virtual void PIMProcessCalibration(double f1, double f2, double rx1, double rx2, double step, double txoff, double rxoff, int mode)
        {
            return;
        }
        public virtual void PIMProcessCalibration(object objConfigList, ClsDataProduct productObj, ClsDataUser user, PIM_ATE.Electrical.ClsCalRecord CalRecord, List<PIM_ATE.Electrical.ClsCalRecordItem> CalRecordItem)
        {
            return;
        }     
        public virtual void TestStop()
        {
            return;
        }
        public virtual void OverTest()
        {
            return;
        }
    }
}
